kaggle的反馈

2025530

10:20

I may be wrong, but I think the biggest problem is the inconsistencies of different test environment, like python version, and torch version, etc.. I remember many people had reported Package Import Error in the competition discussion, this error can be walk arounded by creating a new notebook and copy-paste the same code. I checked the old notebook python  version==3.10 while the new notebook python version==3.11 and I didn't check other python package version. I think that's the main reason but I may be wrong.

 

I think the dependency installation section is the crucial factor. I think there are two stages ,first stage is pip download package and its dependencys, second is pip install package using offline packages downloaded in stage one.

 

In stage two, the actual  install and uninstall behavior is different in different environment. So the Dependency installation code requires very careful crafting to make sure it DO NOT change other packages version. For example, if you write "pip install bitsandbytes==0.45.5" in your installation code, it will firstly download torch==2.7.0, and secondly uninstall old torch version==2.6.0, install torch==2.7.0. But if you run "!pip install bitsandbytes==0.45.5" in your interactive notebook environment, it won't uninstall old torch version==2.6.0, install torch==2.7.0. So that is the difference that we should be aware of and it can be very annoying sometimes.

 

For me, my solution is adding "pip install torch==2.6.0 torchvision==0.21.0 --index-url https://download.pytorch.org/whl/cu124"  explicitly in the installation code, so it won't uninstall old torch version==2.6.0. I'm not a pip expert and not very good at using kaggele package, maybe there are better and easier solution for this problem?

 

已使用 OneNote 创建。